<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATES_PATH;?>/css/login.css">
<header class="layout head padding-small">
    <a href="javascript:pageBack();" class="hBack float-left"></a>
    <h4 class="hTxt float-left text-center text-white">找回密码（第三步）</h4>
    <a href="javascript:;" id="btnJdkey" class="hHlep float-right"></a>
</header>
<!--找回密码S-->
<div class="margin bg-white padding radius-big">
    <!--找回密码的步骤S-->
    <div class="revise-mobile">
        <div class="step text-small">
            <!--正在那一步的添加类active  已经通过了的添加类complete-->
            <div class="step-bar complete" style="width:25%;"><span class="step-point icon-check"></span><span class="step-text">账号验证</span></span></div>
            <div class="step-bar complete" style="width:25%;"><span class="step-point">2</span><span class="step-text">身份校验</span></div>
            <div class="step-bar active" style="width:25%;"><span class="step-point">3</span><span class="step-text">新密码</span></div>
            <div class="step-bar" style="width:25%;"><span class="step-point">4</span><span class="step-text">成功</span></div>
        </div>
    </div>
<div class="new-ct bind">
	<div class="new-pay-pw">
		<div class="new-set-info">
            <form id="set_password" method="post" action="index.php?act=login&op=find_password_step4">
                <span class="new-input-span mg-b15">
                    <input class="border border-ef7f7e layout padding radius-big" name="new_password" id="new_password"  type="password" placeholder="新登录密码">
                    <p style="color: #DA2F2F" class="msg-error">&nbsp;</p>
                </span>
                <span class="new-input-span mg-b15">
                    <input class="border border-ef7f7e layout padding radius-big" name="confirm_password" id="confirm_password"  type="password" placeholder="确认新密码">
                    <p style="color: #DA2F2F" class="msg-error">&nbsp;</p>
                </span>

                <input type="submit" value="提交" id="submitPassword"  class="border-none bg-red text-white layout padding radius-big " style="text-align: center;" />
            </form>
        </div>
    </div>	               
</div>
</div>
<script>
$(function(){

    //取消提示
	$("#new_password").focus(function(){
		$(this).next(".msg-error").html("&nbsp;");
		});

	$("#confirm_password").focus(function(){
		$(this).next(".msg-error").html("&nbsp;");
		});
	
	//提交密码
    $("#submitPassword").click(function(event){
        event.preventDefault();

        var $newPassword = $("#new_password");
        var $confirmPassword = $("#confirm_password");

        if($newPassword.val().length < 1){
            $newPassword.next(".msg-error").html("请填写新密码");
            return false;
            }

        if($confirmPassword.val().length < 1){
            $confirmPassword.next(".msg-error").html("请填写确认密码");
            return false;
            }

        if($confirmPassword.val() != $newPassword.val()){
            $confirmPassword.next(".msg-error").html("确认密码与新密码不一致");
            return false;
            }

        $("#set_password").submit();
                        
        });

    
});
</script>